﻿using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using GraphSharp.Controls;

using Microsoft.SolverFoundation.Common;
using Microsoft.SolverFoundation.Services;

namespace Flux_Balance_Analysis.Graphs
{
    /// <summary>
    /// Logica di interazione per Viewer.xaml
    /// </summary>
    public partial class Viewer : UserControl
    {
        public FBAGraph GraphToVisualize { get { return (DesignerProperties.GetIsInDesignMode(this) ? null : FBACore.GraphToVisualize); } }


        public Viewer()
        {
            InitializeComponent();
        }

        public void Update()
        {
            // scorro tutti i figli e provo a spostarli
            if (graphLayout.Children.Count > 0)
                graphLayout.Relayout();
        }
    }
}
